# Maintainer : Daniel Bermond <dbermond@archlinux.org>
# Contributor: Eric Bélanger <eric@archlinux.org>

pkgname=gifsicle
pkgver=1.94
pkgrel=1
pkgdesc='Command-line tool for creating, editing, and getting information about GIF images and animations'
arch=('loong64' 'x86_64')
url='https://www.lcdf.org/gifsicle/'
license=('GPL2')
depends=('libx11')
source=("https://www.lcdf.org/${pkgname}/${pkgname}-${pkgver}.tar.gz")
sha256sums=('4bc97005c0789620de75f89997d3c2f70758c72c61aa0a2ef04f7a671a2ff89b')

build() {
    cd "${pkgname}-${pkgver}"
    ./configure --prefix='/usr'
    make
}

check() {
    cd "${pkgname}-${pkgver}"
    test/testie -p src test
}

package() {
    make -C "${pkgname}-${pkgver}" DESTDIR="$pkgdir" install
}
